<template>
	<view class="outbound">
		<!-- 订单编号 -->
		 <view class="order-number" v-if="recordsList.length!=0">
			 <span>订单编号：</span><span  class='number'>{{recordsList[0].orderNo}}</span>
		 </view>
		 <!-- 出库记录 -->
		 <view class="item" v-for="(item,index) in recordsList" :key='index'>
				<view class="left">
					<view class="time">	{{item.createTime}} {{item.week}}</view>
					<view class="out-num">
						<span class='number'>出库编号：</span>
						<span >{{item.deliveryNo}}</span>
					</view>
				</view>
				<view class="right" @click="checkDetail(item)">查看详情</view>	
		 </view>
		<view class="out-no" v-if="recordsList.length==0">
			<view class="img">
				<image src="/static/image/noinfo.png" mode=""></image>
			</view>
			<view class="text-no">
				暂无出库记录
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderId:0,
				recordsList:[]
			};
		},
		onShareAppMessage(option) {
			return {
				title: '上云丰花卉',
				path: '/pages/home/home'
			}
		},
		onShareTimeline(option){
			return {
				title: '上云丰花卉',
				path: '/pages/home/home'
			}
		},
		onLoad(option) {
			console.log(option.orderId);
			let self = this;
			self.orderId = option.orderId
			self._get('user/order/get/delivery', {orderId:this.orderId}, res=>{
				console.log(res,'235543');
				const { data } = res;
				  self.recordsList = data
			});
			
		
		},
		methods:{
			// 查看详情 
			checkDetail(item){
				this.gotoPage('/orderpages/order/outboundRecords/outboundDetail/outboundDetail?row='+JSON.stringify(item))
				
			},
			Time(time) {
				if(time==1){
					return '周一'
				}else if(time==2){
					return '周二'
				}else if(time==3){
					return '周三'
				}else if(time==4){
					return '周四'
				}else if(time==5){
					return '周五'
				}else if(time==6){
					return '周六'
				}else if(time==7){
					return '周日'
				}
			}
		}
	}
</script>
	<style lang="less">
		page {
			background-color: #F9F9F9;
		}
	</style>
<style lang="less" scoped>
	
	.order-number {
		width: 100%;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #999999;
		padding-left: 30rpx;
		box-sizing: border-box;
		.number {
			color: #333333;
		}
	}
	.item{
		display: none;
		display: flex;
		justify-content: space-between;
		width: 100%;
		height: 160rpx;
		background: #FFFFFF;
		padding: 30rpx;
		box-sizing: border-box;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
		margin-bottom: 20rpx;
		.out-num {
			margin-top: 20rpx;
		}
		.right {
			width: 144rpx;
			height: 60rpx;
			background: #077840;
			border-radius: 8rpx;
			line-height: 60rpx;
			text-align: center;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
			margin-top: 20rpx;
		}
		.number {
			color: #999999;
		}
	}
	.out-no {
		width: 168rpx;
		height: 172rpx;
		margin-top: 80rpx;
		margin-left: 292rpx;
		.img {
			width: 128rpx;
			height: 102rpx;
			margin-left: 20rpx;
			image {
				width: 100%;
				height: 100%;
			}
		}
		.text-no {
			margin-top: 30rpx;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			
		}
	}
</style>
